import Vue from 'vue'
import Router from 'vue-router'

import UserNotPayOrders from "../components/UserNotPayOrders";
import UserMessage from "../components/UserMessage";
import User from "../components/User";
import ShopCar from "../components/ShopCar";
import OrderPay from "../components/OrderPay";
import OrderPayOver from "../components/OrderPayOver";
import details from "@/components/details";
import HelloWorld from "@/components/HelloWorld";
import index from '@/components/index'
import login from '@/components/login'
import regis from '@/components/regis'
import menuindex from "../components/menuindex";
import goodspackage from "../components/goodspackage";
import EvaluationPage from "../components/EvaluationPage";
import UserFinishOrders from "../components/UserFinishOrders";
import UserNotManageOrders from "../components/UserNotManageOrders";
import OrdersDetails from "../components/OrdersDetails";

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/HelloWorld',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/User',
      name: 'User',
      component: User,
      children: [
        {
          path: '/UserMessage',
          name: 'UserMessage',
          component: UserMessage
        },
        { path:'/UserNotPayOrders',
          name:'UserNotPayOrders',
          component: UserNotPayOrders
        },
        {
          path: '/UserFinishOrders',
          name: 'UserFinishOrders',
          component: UserFinishOrders
        },
        {
          path: '/UserNotManageOrders',
          name: 'UserNotManageOrders',
          component: UserNotManageOrders
        },
        {
          path: '/OrdersDetails/:oname',
          name: 'OrdersDetails',
          component: OrdersDetails
        }
      ]
    },
    {
      path: '/ShopCar',
      name: 'ShopCar',
      component: ShopCar
    },
    {
      path: '/OrderPay/:allprice/:oname',
      name: 'OrderPay',
      component: OrderPay
    },
    {
      path: '/OrderPayOver',
      name: 'OrderPayOver',
      component: OrderPayOver
    },
    {
      path:'/details/:gdid',
      name: 'details',
      component: details
    },
    {
      path: '/',
      name: 'index',
      component: index
    },{
      path: '/login',
      name: 'login',
      component: login
    },{
      path: '/regis',
      name: 'regis',
      component: regis
    },{
      path:'/menuindex',
      name: 'menuindex',
      component: menuindex,
      children:[
        {
          path: '/goodspackage',
          name: 'goodspackage',
          component: goodspackage
        }
      ]
    },{
      path: '/EvaluationPage',
      name: 'EvaluationPage',
      component: EvaluationPage
    }
  ]
})
